<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>学生信息</title>
<script src="http://code.jquery.com/jquery-1.4.4.min.js"></script>

<style>
body{padding: 0px;margin: 0px;}

#footer{width: auto;min-height: 60px;line-height:60px;text-

align:center;font-family:Arial, Helvetica, sans-serif}
#footer{border-top: thin solid #39A631;}#footer a{color:black;}
.con{width: 35%;height: 20em;margin-top:4em;min-width:260px;}
.con{border: thin solid #0080FF;}


 html,body{

               width: 100%;
               height: 100%

            } 
        body{
            background-color: #97CBFF;
            background-size: 100%;
           }


.con_title{background-color: #2894FF;width: auto;height: 3.5em;line-height: 

3.5em;text-align: center;min-width:260px;}
con_title_sp{font-family: "微软雅黑";font-size: 1.5em;font-weight: 

800;color: #FFF;}
.con_input{margin: 2em 0 1em 0;}

.submit-btn{width: 8em;height: 2em;background-color: #0080FF;border-radius: 

4px;border: 0px;color: #fff;font-family:"微软雅黑";font-size: 1em;font-

weight: bold;}
.con_input span{font-family: "微软雅黑";font-size: 1em;font-weight: 

bold;color: #333;}
.con_input input{width: 15em;padding: 0.5em 1em;border: 1px solid #bbb;}
.submit-btn{margin: 1em 0 1em 0;}
.con_select{margin-left: 2em;font-family:"微软雅黑";font-size: 1em;color: 

#333;}
</style>
<script>
         
          function getStudent(){
        	 
        	   var sid=$("#id").val();
        	 $.ajax({
        		 
        		 url: "/CV",
        		 data:{"sno": sid},
        		 type: "post",
                
        	     success: function(abc){
        	    	 $.each(abc,function(i,fl){
        	    		 var id = fl.sno;//注意要与实体类中的名称相同
                         var name = fl.sname;
                         var sex = fl.ssex;
                         var age=fl.sage;
                         var dept = fl.sdept;
                         var major = fl.smajor;
                         var grade = fl.sgrade;
                         var sc_length = fl.school_length;
                         var address = fl.saddress;
                         var politics = fl.spol;
                         var nation = fl.snation;
                         var rp = fl.srp;
                         var move = fl.smove;
                  
                         var value = "<tr><td align='center'>"+id+"</td>";
                       
                          value +="<td align='center'>"+name+"</td> <td align='center'>"+sex+"</td> <td align='center'>"+age+"</td> <td align='center'>"+dept+"</td> <td align='center'>"+major+"</td> <td align='center'>"+grade+"</td> <td align='center'>"+sc_length+"</td> <td align='center'>"+address+"</td> <td align='center'>"+politics+"</td> <td align='center'>"+nation+"</td> <td align='center'>"+rp+"</td> <td align='center'>"+move+"</td><tr/>";
                
                         $("#tb").append(value);//写入到id为tb的html部分
  	                  });
        	     }
        	 })  
         }
            
         
       </script>
<title>个人主页</title><base target="_blank" />
</head>
<body>

<div id="header">
<div class="header_title">
</div>

<div id="content">
<center>
<div class="con">
<div class="con_title">
<span class="con_title_sp">请输入你的学号</span>
</div>
<div class="con_panel">
<div class="con_input">
<span>学号：</span><input type="text" id="id" />
</div>
<input type="submit" value="确认查看" class="submit-btn" onclick="getStudent()"/>
<input type="submit" value="返回" class="submit-btn" onclick="location.href='student.html'"/>
</div>
</div>
</center>
</div>

	<table id="tb" width="80%" border="1" cellspacing="0" cellpadding="0"
		align="center">
		<tr>

			<th align="center">学号</th>
			<th align="center">姓名</th>
			<th align="center">性别</th>
			<th align="center">年龄</th>
			<th align="center">系别</th>
			<th align="center">专业</th>
			<th align="center">年级</th>
			<th align="center">学制</th>
			<th align="center">地区</th>
			<th align="center">政治面貌</th>
			<th align="center">民族</th>
			<th align="center">奖惩记录</th>
			<th align="center">休复转退标记</th>
			</tr>
	</table>
	
</body>
</html>